
""" 原创
三菱图标 """

import sys
from time import sleep
import backpackerxl as xl

b = int(input("请输入行数b="))
character = input("请输入类型(字符)：")
# 实现打印效果


def slow(text):
    for i in text:
        xl.printColor(i, 31, 1),
        sys.stdout.flush()
        sleep(0.3)
    return text
# 打印头部上部分


def titlehead():
    for i in range(1, b+1):
        for j in range(0, 2 * b - i + 5):
            print(' ', end='')
        for k in range(0, 2 * i - 1):
            slow(character)
        print()

# 打印头部的尾部


def titletail():
    for i in range(1, b):
        for k in range(0, i + b + 5):
            print(' ', end='')
        for j in range(0, -2 * i + (2 * b - 1)):
            slow(character)
        print()

# 下部分


def taildown():
    for a in range(1, b+1):
        for g in range(0, b - a + 1):
            print(' ', end='')
        for h in range(0, (b + 4) * 2):
            if h == b+4:
                for g in range(0, 2 * a - 1):
                    print(' ', end='')
            slow(character)
        print()

# 主函数


def main():
    titlehead()
    titletail()
    taildown()


if __name__ == "__main__":
    main()
